package com.upcode.weighing.vo.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 检测统计查询参数
 */
@Data
@ApiModel(value="", description="检测统计查询参数")
public class DetectStatsQueryParam {
    @ApiModelProperty(value = "开始时间")
    private String startTime;
    @ApiModelProperty(value = "结束时间")
    private String endTime;
    @ApiModelProperty(value = "车型")
    private Short vehicleType;
    @ApiModelProperty(value = "车牌号")
    private String plateNo;
    @ApiModelProperty(value = "车牌颜色")
    private Short plateColor;
    @ApiModelProperty(value = "检测点id")
    private Long detectPointId;
    @ApiModelProperty(value = "超限条件类型(1全部,2未超限,3总重超限,4总重超限率,5轴荷超限,6轴荷超限率)")
    private short overParamType=1;
    @ApiModelProperty(value = "超限条件值")
    private double overParamValue;
    @ApiModelProperty(value = "属地")
    private String belongAddr;

    @ApiModelProperty(value = "趋势统计类型(0总览大屏上的趋势或单个车型检测趋势,1每个车型检测趋势)")
    private Short tendencyStatType=0;

    public static final int OVER_TYPE_ALL=1;//全部
    public static final int OVER_TYPE_NOT=2;//未超限
    public static final int OVER_TYPE_TOTAL=3;//总重超限
    public static final int OVER_TYPE_TOTAL_RATIO=4;//总重超限率
    public static final int OVER_TYPE_AXIS=5;//轴荷超限
    public static final int OVER_TYPE_AXIS_RATIO=6;//轴荷超限率

    public static Map<Integer,String> axisTypeMap;
    public static Map<Integer,String> uploadTypeMap;
    public static Map<Integer,String> overTypeMap;
    public static Map<Integer,String> overTypeStatMap;

    static {
        axisTypeMap=new HashMap<>();
        uploadTypeMap=new HashMap<>();
        overTypeMap=new HashMap<>();

        axisTypeMap.put( 2,"二轴");
        axisTypeMap.put( 3,"三轴");
        axisTypeMap.put( 4,"四轴");
        axisTypeMap.put( 5,"五轴");
        axisTypeMap.put( 6,"六轴");
        axisTypeMap.put( 7,"普通平板车");
        axisTypeMap.put( 8,"液压平板车");

        uploadTypeMap.put(1,"全部");
        uploadTypeMap.put(2,"未上传");
        uploadTypeMap.put(3,"已上传");

        overTypeMap.put(1,"全部");
        overTypeMap.put(2,"未超限");
        overTypeMap.put(3,"总重超限＞t");
        overTypeMap.put(4,"总重超限率＞%");
        overTypeMap.put(5,"轴荷超限＞t");
        overTypeMap.put(6,"轴荷超限率＞%");
        overTypeMap.put(7,"卸载复检");

        overTypeStatMap=new HashMap<>();
        overTypeStatMap.put(2,"未超限");
        overTypeStatMap.put(3,"总重超限");
        overTypeStatMap.put(4,"总重超限率");
        overTypeStatMap.put(5,"轴荷超限");
        overTypeStatMap.put(6,"轴荷超限率");
        overTypeStatMap.put(7,"卸载复检");
    }
}
